ShortKey.DataAccess = { db = nil }

local DataAccess = ShortKey.DataAccess

function DataAccess:Load()
	self.db = Eva.Lib.DB:Open("ShortKeyDB")
	self.db:Load("Setting", ShortKey.Setting, false)
	self.db:Load("OutsideGroup", ShortKey.OutsideConfig.SelectedGroup)
	self.db:Load("InsideConfig", ShortKey.InsideConfig)
	self.db:Load("InsideGroup", ShortKey.InsideConfig.SelectedGroup)
end

function DataAccess:Save()
	self.db:SaveAll()
end

function DataAccess:Reset()
	self.db:ResetAll()
end

function DataAccess:ResetSetting()
	self.db:Reset(ShortKey.Setting)
	self.db:Reset(ShortKey.OutsideConfig.SelectedGroup)
	self.db:Reset(ShortKey.InsideConfig.SelectedGroup)
end